#pragma once
#include "FWGame.h"

class FWKeyboard;
class FWGraphic;
class FWContentManager;
class Map;
class Sprite;
class Camera;
class StaticObject;
class IS;
class FWTexture;
class QuadTree;
class Player;
class Bridge;
class Bullet;
#include <d3dx9.h>
#include <list>
class Sniper;
class StandSniper;

class DefenseCannon;
class Boss;
class WallTurret;
class Cannon;
class BackGround;
using namespace std;

class MainGame :
	public FWGame
{
private:	
	D3DXMATRIX matrix_transform;
	FWKeyboard* keyboard;	
	FWGraphic* graphic;		
	FWContentManager* content;
	FWTexture* test;
	Map* _map;
	Camera* _cam;
	list<StaticObject*> grounds;
	QuadTree* _quadTree;	
	Player* _player;
	IS* is;	
	list<Bridge*> _bridge;
	
	list<Bullet*> _lBullet;
	list<StandSniper*> _lStandSniper;

	DefenseCannon* _defenseCannon1;
	DefenseCannon* _defenseCannon2;
	list<DefenseCannon*> _lDefenseCannon;
	list<Boss*> _lBoss;
	list<WallTurret*> _lWallTurret;
	list<Sniper*> _lSniper;
	list<Cannon*> _lCannon;
	BackGround* _bg;
	void loadEnemy();
	void renderEnemies();		

public:
	MainGame(HINSTANCE hIns,char* windowName,int w,int h);
	~MainGame(void);

	void load();//load game data

	void update(float time);//cap nhat game

	void render();// the hien game

	void shutdown();//ket thuc game

	void RenderDebug();
};

